import request from '../request'

export default {
  async getFoodClasses () {
    return await request.get('/v2/index_entry')
  },
  async getShopList (limit, orderBy) {
    return await request.get(`/shopping/restaurants?latitude=31.22967&longitude=121.4762&limit=${limit}&order_by=${orderBy}`)
  },
  async getShopSum () {
    return await request.get('/shopping/restaurants/count')
  },
  async getShopInfo (shopId) {
    return await request.get(`/shopping/restaurant/${shopId}`)
  },
  async getFoodList (shopId) {
    return await request.get(`/shopping/v2/menu?restaurant_id=${shopId}`)
  },
  async getRateList (shopId) {
    return await request.get(`/ugc/v2/restaurants/${shopId}/ratings?offset=0&limit=10`)
  },
  async getRateScores (shopId) {
    return await request.get(`/ugc/v2/restaurants/${shopId}/ratings/scores`)
  },
  async getRateTags (shopId) {
    return await request.get(`/ugc/v2/restaurants/${shopId}/ratings/Tags`)
  }
}
